<?php

namespace App\Http\Controllers\Api\User;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\UserPoint;
use App\Http\Requests\Api\ApiRequest;

class UserPointController extends Controller
{
   
    /**
     * 记录
     */
    public function log(ApiRequest $request)
    {
        $rs['status']    = true;
       
        $where['user_id'] = $request->user_id;
        $data   = UserPoint::where($where)
                            ->orderBy('created_at','desc')
                            ->paginate(10);
        $rs['data'] = $data;
        return response()->json($rs);
    }

    

}
